<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>欢迎登录</title>
<script src="https://hcb98.gitee.io/test_pages/jquery-1.8.1.js"></script>
<script type="text/javascript"> 
$(document).ready(function(){
$(".flip").click(function(){
    $(".panel").slideToggle("slow");
  });
});
</script>
 
<style type="text/css"> 
div.panel,p.flip
{
font-size:20px;
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:300px;
display:none;
}

</style>
</head>
 
<body>
<p class="flip" style="color:red">Welcome To My Index</p>
<div class="panel">
        <div class="top">       
                <div class="ceshi"><h1>登录界面</h1></div>
               </div>
                <div class="content">        
               <div class="int">          
               <input id="name" type="text" placeholder="你的手机号/用户名">       
               </div>        
               <div class="int">            
               <input id="pwd" type="password" placeholder="输入密码">        
               </div>              
               <div class="setting">            
               <a href="#" class="auto-login">
               <input type="checkbox">下次自动登录
               </a>           
                <a href="#" class="forget-pwd">忘记密码</a>        
               </div>        
               <div class="login">            
               <button type="button" onclick="check()">登录</button>      
               </div>        
               <div class="reg">还没账号?<a href="https://hcb98.gitee.io/test_pages/new2">马上注册</a>        
               </div>     
                
               <div class=dengluyanzheng>
                   <script type="text/javascript">
                        function check(){
                            
                            var mima=localStorage.getItem("Password");
                            var pwd=document.getElementById("pwd").value;
                            
               
                            if (pwd!=mima) {
                                alert ("密码错误")
                                window.location.href="https://hcb98.gitee.io/test_pages/new2"
                                return;
               
                       }
                           if (pwd==mima) {
                               alert ("恭喜！欢迎登录")
                               window.location.href="https://hcb98.gitee.io/test_pages/new4"
                               return;
               
                           }
                   }
               
               
                        
                    </script>


</div>
 

 
</body>
</html>
